package com.leyantech.ecp.agenx.task.consumer;

import com.leyantech.ai.DialogueReply;
import com.leyantech.ecp.agenx.common.converter.output.DialogueReplyConverter;
import com.leyantech.ecp.agenx.common.sender.Dispatcher;
import com.leyantech.ecp.agenx.task.filter.TaskFilter;

import com.google.common.collect.ImmutableList;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import lombok.extern.slf4j.Slf4j;

/**
 * @author eahau, {@literal <eahau@foxmail.com>}
 * @date 2022-11-01.
 */
@Slf4j
@Singleton
public class TakeActionMessageConsumer extends TaskConsumer<DialogueReply> {

  @Inject
  public TakeActionMessageConsumer(Dispatcher dispatcher,
      DialogueReplyConverter dialogueReplyConverter,
      ImmutableList<TaskFilter<DialogueReply>> filters) {
    super(dispatcher, dialogueReplyConverter, filters);
  }

  @Override
  protected String getStoreId(DialogueReply dialogueReply) {
    return dialogueReply.getStoreId();
  }

  @Override
  protected String getAssistantId(DialogueReply dialogueReply) {
    return dialogueReply.getAssistantId();
  }

}
